//
//  Allhelp.m
//  WeiShengJianDu
//
//  Created by yons on 15/11/4.
//  Copyright © 2015年 Lishuang. All rights reserved.
//

#import "Allhelp.h"

@implementation Allhelp

#pragma mark-创建文件夹
+(NSString *)creatFile:(NSString *)path
{
    NSArray * myPaths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
    NSString * myDocPath = [myPaths objectAtIndex:0];
    NSString *newPath = [myDocPath stringByAppendingPathComponent:path];
    return newPath;
}
#pragma mark-获取当前日期
+(NSString *)geyTime
{
    NSDate *senddate = [NSDate date];
    NSDateFormatter  *dateformatter=[[NSDateFormatter alloc] init];
    [dateformatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
    NSString *timeString=[dateformatter stringFromDate:senddate];
    return timeString;
}

+ (NSString *)getTimeStr
{
    NSDate *senddate = [NSDate date];
    NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];
    [dateformatter setDateFormat:@"YYYYMMddHHmmss"];
    NSString *timeString=[dateformatter stringFromDate:senddate];
    return timeString;
}

+ (NSString *)getDay
{
    NSDate *senddate = [NSDate date];
    NSDateFormatter  *dateformatter=[[NSDateFormatter alloc] init];
    [dateformatter setDateFormat:@"YYYY-MM-dd"];
    NSString *timeString=[dateformatter stringFromDate:senddate];
    return timeString;
}

@end
